<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<% String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/"; %> 
<html>
<jsp:include page="../head.jsp"></jsp:include>
<body>
<br/><br/><br/><a href='TbContractServlet?method=showadd&contractType=${sessionScope.contractType}&isArchive=0'><img src="./images/button-add.gif" border="0"/></a><br/>
<table>
<tr>
    <td>序号</td>
    <td>合同编号</td>
    <td>合同名称</td>
    <td>${sessionScope.contractType==0?'供应商公司':'合作方公司' }</td>
    <td>${sessionScope.contractType==0?'供应商联系人':'合作方联系人' }</td>
    <td>合同有效期 </td>
    <td>合同状态</td>
    <td>合同价格</td>
    <td>合同签订时间</td>
    <td>我方签订人</td>
    <td>用户</td>
    <td ${sessionScope.isArchive==1?' style="display: none;" ':'' }>修改</td>
    <td ${sessionScope.isArchive==1?' style="display: none;" ':'' }>归档</td>
</tr>
<c:forEach items="${sessionScope.tbContractList==null?'':sessionScope.tbContractList}" var="tbContract" varStatus="status">
<tr>
    <td>&nbsp;${status.index+1}</td>
    <td><a href="TbContractServlet?method=contractInfo&contractCode=${tbContract.contractCode }">${tbContract.contractCode}</a></td>
    <td>${tbContract.contractName}</td>
    <td>${tbContract.tbCompany.companyName}</td>
    <td>${tbContract.companyContract}</td>
    <td>${tbContract.startDateSigned}至${tbContract.endDateSigned}</td>
    <td>${tbContract.contractState==0?'施工中':tbContract.contractState==1?'验收中':tbContract.contractState==2?'回款中':tbContract.contractState==3?'已完工':tbContract.contractState==4?'整改中':'无' }</td>
    <td>${tbContract.contractPrice}</td>
    <td>${tbContract.contractSignedTime }</td>
    <td>${tbContract.ourCompanyUser}</td>
    <td>${tbContract.tbUsers.userName}</td>
    <td ${sessionScope.isArchive==1?' style="display: none;" ':'' }><a href='TbContractServlet?method=listById&contractType=${sessionScope.contractType}&contractId=${tbContract.contractId}&isArchive=0&contractCode=${tbContract.contractCode }'>修改</a></td>
    <td ${sessionScope.isArchive==1?' style="display: none;" ':'' }><a href='javascript:void(0);'onclick='if(confirm("确定要归档?"))window.location="../TbContractServlet?method=archive&contractType=${sessionScope.contractType}&isArchive=0&contractCode=${tbContract.contractCode }";'>归档</a></td>
</tr>
</c:forEach>
</table>
<jsp:include page="../foot.jsp"></jsp:include>
</body>
</html>